Click Here!
home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

Oracle Performance Tuning and Optimization
(Publisher: Macmillan Computer Publishing)
Author(s): Edward Whalen
ISBN: 067230886x
Publication Date: 04/01/96

Bookmark It

Search this book:
 
Previous Table of Contents Next


Chapter 14
Advanced Disk I/O Concepts

This chapter describes the internal operations of a disk drive. The description is followed by the calculations you need to determine the number of I/Os per second your system can support. These numbers are very important in putting together the system configuration.

In many large systems, the number of I/Os per second that the system can support may be determined by a bottleneck in a single drive. If the RDBMS is waiting for a specific piece of information before it can proceed with the transaction, any time spent waiting (called latency) can affect the performance of the entire transaction.

A disk drive has certain limitations you cannot exceed. Once you reach this limit, you cannot achieve a higher I/O rate and performance suffers. As you see in this chapter, you can overcome this problem by adding more or faster disk drives. By understanding these limitations, you will have the knowledge necessary to optimize the use of these disks to achieve the best performance possible.

Disk Operation

A disk drive is an electronic storage device that holds information. The disk holds that information on the disk magnetically. To read the disk, the input device (head) moves over the place where the information is held and determines how the information has been stored. Depending on the magnetism of the spot on the disk, the value of the data is either 0 or 1.

Consider the individual components first and then look at the entire disk drive as it works together to store and retrieve information. The disk drive is made up of thin disks of magnetic storage material called platters. These platters look very much like the compact discs (CDs) with which you are familiar.

The platter is divided into tracks. A track is the path on which the disk stores information (see Figure 14.1). Tracks are further separated into sectors; it is in these sectors that the data is actually stored. There may be 512 or 1,024 bytes per sector, depending on the drive manufacturer.


Figure 14.1   A disk platter.

You may have one or more platters in your disk drive. Evolving disk drive technology has allowed manufacturers to pack the tracks tighter, allowing more information to be stored on a platter. The total disk space you have is the product of the number of bytes per platter times the number of platters.

The disk platters rotate at anywhere from 4,000 to 8,000 RPM (revolutions per minute). As the platter rotates, the heads move in and out on a linear path (see Figure 14.2). The heads are attached to a disk arm that is used to move the heads in and out.


Figure 14.2   The disk arm and heads.

Usually, the heads and arms are connected so that when the arm moves, all the heads move simultaneously. The heads are moved by a small, very precise motor. As information is requested, the disk arm moves the head over the desired track; the disk then simply waits for the desired data to move underneath the head. In this manner, all data is retrieved from the disk.

A cylinder is a stack of vertically aligned tracks. Because all the heads are connected, they are all over the same track on different platters. The set of tracks on top of which the heads are located is really what is called the cylinder (see Figure 14.3).


Figure 14.3   Disk cylinders.

A motor is dedicated to spinning the platters. This motor must be very precise. The final component in the disk drive is the electronics used to control the motors and move the head to the correct place on the disk.

Usually, the disk drive also has a small buffer used to move data in and out of the disk more efficiently. This buffer can be used to sort multiple data requests to try to reduce seek time.

Seek Time

A seek refers to moving the head to the proper track. The seek time is the time it takes for the heads to move over to that proper track (see Figure 14.4). If you look at the specifications for your disk drive, you will most likely find specifications for single-track, average, and full-stroke seek times. These statistics give you an idea of approximately how long it takes to get to your data. Single-track seek time means the time it takes to move to the next adjacent track. Average seek time means the average time you can expect the seek to take. Full-stroke seek time means the time it takes to seek from the first track to the last track.


Figure 14.4   A disk seek.

For a typical disk drive available today, the average seek time is from 8 to 15 milliseconds. The single-track seek time is from 3 to 5 milliseconds and the full-stroke seek time is around 15 to 25 milliseconds.

The seek time is very important; it is the seek time and the rotational latency time that really add up to all the time you spend getting to the data. Once you have actually found the data, it takes very little time to transfer that data to memory.

Rotational Latency

Once you move the heads to position them on the proper track, you may have to wait for the platter to rotate until the actual sectors in which you are interested are under the head. The time you spend waiting for the platter to rotate is called the rotational latency.

Suppose that your disk drive has a rotational speed of 4,500 RPM. Its number of revolutions per second can be calculated as follows:

Revolutions per second = 4500 revolutions per minute / 60 seconds per
minute = 75 revolutions per second

Once you know the number of revolutions per second, you can do a simple inversion and determine the number of seconds per revolution:

Seconds per revolution = 1/75 revolutions per second = 0.0133 seconds per
revolution = 13.33 milliseconds per revolution

Now you know how long it takes for a complete revolution to take place. (Some high-speed SCSI disks have a rotational speed of 7,200 RPM, which results in a rate of 8.33 msec per revolution!) You can guess that the average rotational latency is approximately half a revolution:

Average Rotational Latency = 13.33 msec per revolution / 2 = 6.66 msec

For the example of the disk drive with a rotational speed of 4,500 RPM, the average rotational latency is 6.66 milliseconds. This data is just another piece in the equation used to determine how many I/Os per second your disk drive can handle.


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited.